package com.fs.zx.mybatis.starter;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@ConfigurationProperties("zx.datasource")
public class ZxDataSourceProperties {
    private String driverName="com.mysql.jdbc.Driver";
    private String userName="root";
    private String password;
    private String poolName="zxDataSource";
    private String url="";

    /**
     * 最大活跃线程数
     */
    private Integer maxActive = 50;
    /**
     * 链接超时时间 10s
     */
    private Integer connectionTimeOut = 10000;
    /**
     * 允许连接在池中闲置的最长时间。 1800000（30分钟）
     */
    private Integer idleTimeOut = 1800000;

    /**
     * 最小空闲数
     */
    private Integer minIdle = 5;

    private String validationQuery = "select 'x'";
    /**
     * mapper扫描包
     */
    private String mybatisBasePackage = "com.fs.zx";
    /**
     * mapper xml扫描位置
     */
    private String mybatisBasePath = "classpath*:mapper/**/*.xml";

}
